package com.neusoft.springdemo.serviice.aop;

import org.apache.log4j.Logger;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

import com.neusoft.springdemo.mapper.FoodMapperJdbcImpl;

/**
 * 使用注解进行配置spring组件
 * 
 * @author chens
 *
 */
@Component
@Aspect
public class MyAdvice {
	private Logger logger = Logger.getLogger(FoodMapperJdbcImpl.class);

	@Before("execution(* com.neusoft.springdemo.serviice.*.*(..))")
	public void beforeMethod(JoinPoint joinpoint) {
		logger.info("【前置通知日志】" + joinpoint.toString());
	}
}